#pragma once
#include "common.h"
#include "Animation.h"
#include "Object.h"

struct EntityEntry
{
    int type;
    std::string name;
    std::string animName;
    int sizex;
    int sizey;
};

class sgEntity:public sgObject
{
public:
    sgEntity();
    virtual ~sgEntity();
    virtual bool Initialize( );
    virtual void Update( int delta );
    virtual void Render( );
	IPoint	&GetPosition( );
	void	SetPosition( IPoint &point );
	virtual void Serialize( CSerialize& s );
    virtual void ProcessMessage( sgMessage *msg );
    virtual sgEntity *Clone( );
    virtual EntityEntry &GetEntry( );
    static sgObject *Creator( );
    static bool m_creatorRegisted;
protected:
    Animation m_animation;
	IPoint    m_position;
    EntityEntry m_entry;
    int m_layer;
};